package com.cencat.merchant.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.Min;
import java.time.LocalDateTime;

/**
 * 商家查询DTO
 * @author cencat
 * @since 2024-01-01
 */
@Data
@Schema(description = "商家查询DTO")
public class MerchantQueryDTO {

    @Schema(description = "商家名称", example = "张三")
    private String merchantName;

    @Schema(description = "商家编码", example = "M202401001")
    private String merchantCode;

    @Schema(description = "联系人姓名", example = "张三")
    private String contactName;

    @Schema(description = "联系电话", example = "13800138000")
    private String contactPhone;

    @Schema(description = "联系邮箱", example = "zhangsan@example.com")
    private String contactEmail;

    @Schema(description = "商家状态", example = "1")
    private Integer status;

    @Schema(description = "商家等级", example = "1")
    private Integer level;

    @Schema(description = "审核状态", example = "1")
    private Integer auditStatus;

    @Schema(description = "是否启用", example = "true")
    private Boolean enabled;

    @Schema(description = "创建时间开始", example = "2024-01-01T00:00:00")
    private LocalDateTime createTimeStart;

    @Schema(description = "创建时间结束", example = "2024-12-31T23:59:59")
    private LocalDateTime createTimeEnd;

    @Schema(description = "更新时间开始", example = "2024-01-01T00:00:00")
    private LocalDateTime updateTimeStart;

    @Schema(description = "更新时间结束", example = "2024-12-31T23:59:59")
    private LocalDateTime updateTimeEnd;

    @Schema(description = "当前页", example = "1")
    @Min(value = 1, message = "当前页必须大于0")
    private Integer current = 1;

    @Schema(description = "页大小", example = "10")
    @Min(value = 1, message = "页大小必须大于0")
    private Integer size = 10;

    @Schema(description = "排序字段", example = "createTime")
    private String sortField = "createTime";

    @Schema(description = "排序方向", example = "desc")
    private String sortOrder = "desc";

    @Schema(description = "关键词搜索", example = "张三")
    private String keyword;
}